package pl.bizuteria.sklep.admin.client.activity.product;

import pl.bizuteria.sklep.admin.client.ui.product.IProductEditView;

import com.google.gwt.event.shared.EventBus;
import com.google.gwt.place.shared.PlaceController;
import com.google.web.bindery.requestfactory.shared.EntityProxy;
import com.google.web.bindery.requestfactory.shared.RequestContext;

public abstract class CreateAndEditActivity<P extends EntityProxy, V extends IProductEditView<P>>
		extends EditActivity<P, V>{

	public CreateAndEditActivity(IRequestMixin<P> requestMixin, IProductEditView<P> view, EventBus eventBus,
			PlaceController placeController, RequestContext request,  Class<P> proxyClazz) {
		super(requestMixin, view, eventBus, placeController, request);
		proxy = request.create(proxyClazz);
	}
	
	
	P proxy;
	
	@Override
	protected P getProxy() {
		return proxy;
	}
}
